package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;
import org.springframework.context.annotation.Bean;

public class UserServiceImpl implements UserService {
    private UserDao   userDao;
    private int num;

    public void setNum(int num) {
        this.num = num;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserServiceImpl(){
        System.out.println("构造方法运行了");
    }
    public void init(){
        System.out.println("bean对象初始化了");
    }
    public void destory(){
        System.out.println("bean对象被销毁了");
    }
    public void save() {
        System.out.println("user service running..."+num);
    }
}
